package com.zx.link.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * @version v1.0
 * @Project: link
 * @Title: LinkType
 * @Description: 网络连接的分类
 * @author: zhangx
 * @date: 2017年3月1日 上午11:00:29
 * @company: webyun
 * @Copyright: Copyright (c) 2017
 */
@Data
@Accessors(chain = true)
@TableName("li_link_type")
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class LinkType implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;

    private Integer orderId;

    @TableField(exist = false)
    private List<Link> linkList;

    public String toJSON() {
        return "{ \"id\":" + this.id + ", \"name\":\"" + this.name + "\"}";
    }

}
